package com.erp.auto.controller;

import com.erp.auto.domain.ErpAutoEvaluationAssociation;
import com.erp.auto.service.ErpAutoEvaluationAssociationService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ruoyi.common.core.domain.R;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * 自动测评商品关联表
 *
 * @author WXX
 * @date 2023-12-27 08:59:43
 */
@RestController
@AllArgsConstructor
@RequestMapping("/kjerp/erpAutoEvaluationAssociation" )
public class ErpAutoEvaluationAssociationController {

    private final ErpAutoEvaluationAssociationService erpAutoEvaluationAssociationService;

    @GetMapping("/getList")
    public R<Object> getList(@RequestParam(defaultValue = "1") Integer pageNum,
                             @RequestParam(defaultValue = "10") Integer pageSize,
                             ErpAutoEvaluationAssociation association) {

        PageHelper.startPage(pageNum, pageSize);
        List<ErpAutoEvaluationAssociation> list = erpAutoEvaluationAssociationService.getList(association);
        PageInfo<ErpAutoEvaluationAssociation> pageInfo = new PageInfo<>(list);
        return R.ok(pageInfo);
    }
}
